package model.Entity.SIS;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the SIS_DEPTS database table.
 * 
 */
@Embeddable
public class DeptPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="FACULTY_NO", insertable=false, updatable=false)
	private Integer facultyNo;

	@Column(name="DEPT_NO")
	private Integer deptNo;

	public DeptPK() {
	}
	public Integer getFacultyNo() {
		return this.facultyNo;
	}
	public void setFacultyNo(Integer facultyNo) {
		this.facultyNo = facultyNo;
	}
	public long getDeptNo() {
		return this.deptNo;
	}
	public void setDeptNo(Integer deptNo) {
		this.deptNo = deptNo;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof DeptPK)) {
			return false;
		}
		DeptPK castOther = (DeptPK)other;
		return 
			(this.facultyNo == castOther.facultyNo)
			&& (this.deptNo == castOther.deptNo);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.facultyNo ^ (this.facultyNo >>> 32)));
		hash = hash * prime + ((int) (this.deptNo ^ (this.deptNo >>> 32)));
		
		return hash;
	}
}